#pragma once
#include "rclcpp/rclcpp.hpp"
#include "std_msgs/msg/string.h"
#include "dds_test_interface/msg/test_data.hpp"

#include <vector>

class DDSTestSubscriber : public rclcpp::Node
{
public:
    DDSTestSubscriber(bool isRealiable, int historyDepth);
    ~DDSTestSubscriber();

private:
    rclcpp::Subscription<dds_test_interface::msg::TestData>::SharedPtr dataSub;
    int rcvCnt = 0;

    double statisticsStTs;
    std::vector<double> statisticsVec;

    void onDDSTestDataReceived(dds_test_interface::msg::TestData::SharedPtr msg);
};